/*
 * Spring 2012 TCSS360 Deliverable 3
 * Otis Alexander
 */

package model;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

public class Bidder extends User {

	private Map<Item, BigDecimal> itemBids;

	private String creditCard;

	public Bidder(final String firstName,
			final String lastName, final String userName,
			final String the_credit_card) {
		super(firstName, lastName, userName, 3);
		itemBids = new HashMap<Item, BigDecimal>();
		creditCard = the_credit_card;
	}

	public Bidder(final String firstName,
			final String lastName, final String userName) {
		super(firstName, lastName, userName, 3);
		itemBids = new HashMap<Item, BigDecimal>();
		creditCard = null;
	}

	public boolean alreadyBidded(Item item) {
		return itemBids.containsKey(item);
	}

	public Map<Item, BigDecimal> getBids() {
		return itemBids;
	}

	public void addBid(Item item, BigDecimal bid) {
		itemBids.put(item, bid);
	}

	public String getCreditCard() {
		return creditCard;
	}

	public void setCreditCard(final String new_cc) {
		creditCard = new_cc;
	}
}
